home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / answrbok / 5_8.lha / 5_8 / 5_8b3.c < prev    next >
Text File  |  1993-08-08  |  243b  |  12 lines

  1. * Copyright (c) 1990 by AT&T Bell Telephone Laboratories, Incorporated. */
  2. * The C++ Answer Book */
  3. * Tony Hansen */
  4. * All rights reserved. */
  5. include <math.h>
  6.  
  7. nt erand::draw()
  8.  
  9.    return
  10. (int) (-mean * log( 1.0 - randint::fdraw() ) + 0.5);
  11.  
  12.